package org.vectrics.recruiter.struts.tag;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Category;
import org.vectrics.common.html.BorderTable;
import org.vectrics.common.pagelist.PageList;
import org.vectrics.company.CompanyPersonCriteria;
import org.vectrics.company.CompanyPersonPageList;
import org.vectrics.web.struts.CompanyPersonListTag;


public class RecruitCompanyPersonListTag extends CompanyPersonListTag  {
	public static final long serialVersionUID = 9073765023455345L;
	
	private static Category log = Category.getInstance(RecruitCompanyPersonListTag.class);
    
    
	public RecruitCompanyPersonListTag() {
		super();
	}
	
	
	protected PageList createPageList() {
		log.debug("Create the page list object that will be used by base class to fill list.");
		PageList pageList = null;
		CompanyPersonCriteria criteria = new CompanyPersonCriteria();
		criteria.setCompany(this.getCompany());
		pageList = new CompanyPersonPageList(criteria);
		return(pageList);	
	}
	
    
    public String getPageListLink() {
        return(getContextPath() + "/admin/company/persons/view.do?companyId=" + this.getCompanyId());
        
    }
    
    
    protected String getNewCompanyLink(HttpServletRequest request) {
        return(request.getContextPath() + "/admin/company/edit.do");
    }

    protected void setTableProperties(BorderTable table) {
        table.setWidth(500);
    }

    

}